apiVersion: v1
kind: Service
metadata:
  name: my-attu-svc
  labels:
    app: attu
spec:
  type: ClusterIP
  ports:
  - name: attu
    protocol: TCP
    port: 3000
    targetPort: 3000
  selector:
    app: attu
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: milvus-config
data:
  milvus_url: "<SERVICE>:<PORT>"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-attu
  labels:
    app: attu
spec:
  replicas: 1
  selector:
    matchLabels:
      app: attu
  template:
    metadata:
      labels:
        app: attu
    spec:
      containers:
      - name: attu
        image: zilliz/attu:v2.3.8
        imagePullPolicy: IfNotPresent
        ports:
        - name: attu
          containerPort: 3000
          protocol: TCP
        env:
        - name: MILVUS_URL
          valueFrom:
            configMapKeyRef:
              name: milvus-config
              key: milvus_url
